react how to remove commas from a string

139

react how to remove commas from a string -

var stringWithCommas = 'a,b,c,d';
var stringWithoutCommas = stringWithCommas.replace(/,/g, '');
console.log(stringWithoutCommas);

Comments

Submit
0 Comments